//
//  RDeliveryAES.h
//  RDelivery
//
//  Created by mellow on 2021/6/7.
//  Copyright (c) 2021 Tencent. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreFoundation/CoreFoundation.h>
#import <CommonCrypto/CommonDigest.h>
#import <CommonCrypto/CommonCryptor.h>

NS_ASSUME_NONNULL_BEGIN

@interface RDeliveryAES : NSObject

+ (NSData *)encryptAESCTRData:(NSData *)data key:(NSString *)key error:(NSError **)error;

+ (NSData *)decryptAESCTRData:(NSData *)data key:(NSString *)key error:(NSError **)error;

+ (NSData *)directEncryptAESCTRData:(NSData *)data key:(NSString *)key error:(NSError **)error;

+ (NSData *)directDecryptAESCTRData:(NSData *)data key:(NSString *)key error:(NSError **)error;

+ (NSString *)randomAES128EncryptKey;

@end

NS_ASSUME_NONNULL_END
